<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::group(['middleware' => 'Quan'],function(){
    Route::get('Admin/index','Admin\IndexController@index');//后台主页

    Route::get('Admin/Managermglist','Admin\ManageController@mglist');//管理者列表

    Route::post('Admin/Managermglist','Admin\ManageController@mglistpost');//增加管理者

    Route::get('Admin/mgdel/{mg_id}','Admin\ManageController@mgdel');//管理者删除

    Route::get('Admin/mgedit/{mg_id}','Admin\ManageController@mgedit');//管理者修改

    Route::post('Admin/mgedit/{mg_id}','Admin\ManageController@mgeditpost');//管理者修改;

    Route::get('Admin/Managermglog','Admin\ManageController@mglog');//登陆信息

    Route::get('Admin/Managermgrole','Admin\ManageController@mgrole');//角色列表

    Route::get('Admin/Competence','Admin\ManageController@Competence');//添加角色

    Route::post('Admin/Competence','Admin\ManageController@Competencepost');//添加角色

    Route::get('Admin/Competence2/{role_id}','Admin\ManageController@Competence2');//修改角色

    Route::post('Admin/Competence2/{role_id}','Admin\ManageController@Competence2post');//修改角色

    Route::get('Admin/mgroledel/{role_id}','Admin\ManageController@mgroledel');//删除角色


    Route::post('Admin/authlist','Admin\ManageController@authadd');//添加权限
    Route::get('Admin/authlist','Admin\ManageController@authlist');//添加权限
    Route::get('Admin/authdel/{auth_id}','Admin\ManageController@authdel');//删除权限


    Route::get('Admin/catdel/{id}','Admin\TypeController@del');  //删除类型栏目

    Route::get('Admin/Region','Admin\TypeController@Region_query');  //地区列表GET

    Route::post('Admin/Regionadd','Admin\TypeController@ins_Region');  //地区列表POST

    Route::get('Admin/Regiondel/{id}','Admin\TypeController@Region_del'); //地区删除

    Route::get('Admin/Column','Admin\TypeController@query');  //添加类型GET

    Route::post('Admin/Columnadd','Admin\TypeController@ins_Column'); //添加类型POST

    Route::get('Admin/mv', 'Admin\MovController@movadd');  //影片添加GET

    Route::post('Admin/mv', 'Admin\MovController@movadd');   //影片添加POST

    Route::get('Admin/mv/up', 'Admin\MovController@up');     //图片上传

    Route::get('Admin/mvlist', 'Admin\MovController@movlist');   //影片列表

    Route::get('Admin/movdel/{fid}','Admin\MovController@del');    //影片删除

    Route::match(['get','post'],'Admin/edit/{fid}','Admin\MovController@edit'); //影片编辑


    Route::get('Admin/news', 'Admin\NewsController@newsadd');  //影视讯息添加GET

    Route::post('Admin/news', 'Admin\NewsController@newsadd');   //影视讯息添加POST


    Route::get('Admin/user_list','Admin\UserController@user_list');//用户列表
    Route::get('Admin/member_Grading','Admin\UserController@member_Grading');//用户
    Route::get('Admin/member_show/{id}','Admin\UserController@member_show');
    Route::get('Admin/integration','Admin\UserController@integration');//显示信息
    Route::get('Admin/del/{id}','Admin\UserController@del');//删除
    Route::get('Admin/vid/{id}','Admin\UserController@vid');
    Route::get('Admin/right/{id}','Admin\UserController@right');
     //后台主页面
     Route::get('Admin/home',function(){ return view('Admin/home') ;}); 
});

Route::get('Admin/login','Admin\ManageController@login');//登陆
Route::post('Admin/login','Admin\ManageController@loginpost');//登陆
Route::get('Admin/logout','Admin\ManageController@logout');//退出







/*********************************后台******************************************/
/*********************************前台******************************************/

Route::get('Home/new', function(){ return view('home/news');}); //最新页面

//Route::get('Home/news-single/{id?}','Home\CommentController@comlist');

Route::get('Home/news-single/{fid}','Home\CommentController@comlist');//展示播放页面
Route::post('Home/news-single/{fid}','Home\CommentController@postAdd');//提交评论


//Route::get('Home/comadd','Home\CommentController@add'); //评论页面GET

//Route::post('Home/comadd','Home\CommentController@postAdd'); //评论页面POST
Route::get('Home/New','Home\YpzxController@Nquery');//最新电影页面

Route::get('Home/News','Home\YpzxController@xinwen');//新闻NEWS页面

Route::get('wenz/{id}','Home\YpzxController@art');//文章页面


/*********************************待修改******************************************/
//主页展示
Route::get('/','Home\IndexController@index');


//搜索内容到搜索页面
Route::get('Home/list',function(){
    return redirect('Home/list/'.$_GET['search']);
});
Route::get('Home/list/{sea}','Home\ListController@sfind');


//进入按影片类型分类的页面
Route::get('ftype/{fid}','Home\ListController@find_type');


Route::get('areas/{area_is}','Home\ListController@showarea');
//Route::get('/ftype/{fid}','Home\IndexController@nave');
//进入影片准备播放页面
Route::get('ftype/fdisplay/{fid}','Home\ListController@pre_display');
//拯救页面没有下列导航头则出错










/*********************************注册******************************************/
Route::post('auth/register','Auth\AuthController@postRegister');

Route::post('auth/login','Auth\AuthController@postLogin');  //注册

Route::get('auth/logout','Auth\AuthController@getLogout'); //退出

Route::get('user','IndexController@user');              //显示用户详细信息

Route::get('user/edit','IndexController@user_edit');     //编辑用户信息GET

Route::post('user/edit/{id}','IndexController@edit_post');    //编辑用户信息POST




/****************************微信***************************/

Route::any('wx','WxController@index');